<?php 

require("admin-header.php");
require("../functionbase.php");
if (isset($_GET['goto']))
{
	$goto=$_GET['goto'];
} 
else 
{
	$goto="admin.php";
}
if (!isset($_SESSION['user_rights'])){
	redirect($goto);
}

if (!isset($_GET['id'])) redirect($goto);
$user_id = $_GET['id'];
$sql='update users set defunct = if(defunct="N","Y","N") where user_id ="'.$user_id.'" and reference="'.$_SESSION['user_id'].'"';
//echo $sql;
$result = mysql_query($sql);
redirect($goto);
require("../oj-footer.php");
?>
